//
//  OrderingViewController.m
//  Ordering
//
//  Created by niko on 11-6-23.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#import "OrderingViewController.h"
#import "Common.h"

@implementation OrderingViewController
@synthesize titleImageView = titleImageView_;
@synthesize backgroundImageView = backgroundImageView_;

- (void)dealloc
{
    [titleImageView_ release];
    [backgroundImageView_ release];
    [super dealloc];
}

- (void)didReceiveMemoryWarning
{
    // Releases the view if it doesn't have a superview.
    [super didReceiveMemoryWarning];
    
    // Release any cached data, images, etc that aren't in use.
}

#pragma mark - View lifecycle


// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
    [super viewDidLoad];
    titleImageView_ = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ORDER_MAIN_TITLE_IMAGE]];
    backgroundImageView_ = [[UIImageView alloc] initWithImage:[UIImage imageNamed:ORDER_MAIN_BG_IMAGE]];
    
    titleImageView_.frame = CGRectMake(115, 0, 800, 175);
    backgroundImageView_.frame = CGRectMake(0, 0, 1024, 1024*1024/768);
    
    [self.view addSubview:backgroundImageView_];
    [self.view addSubview:titleImageView_];
    
}


- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    // e.g. self.myOutlet = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    // Return YES for supported orientations
    //只支持横屏
    if(interfaceOrientation == UIInterfaceOrientationLandscapeLeft ||
       interfaceOrientation == UIInterfaceOrientationLandscapeRight){
        
        self.view.frame = CGRectMake(0, 0, 1024, 768);
        
        return YES;
    }
    return NO;
}

@end
